﻿Ext.define('Happy.security.user.metadata.Metadata', {
    extend: 'Happy.metadata.Metadata',
    singleton: true,

    constructor: function () {
        var me = this;

        me.data = {
            namespace: 'Happy.security',
            name: 'User',
            plural: 'Users',
            urlPrefix: 'Happy/Security',
            displayName: '用户',
            summaryProperty: 'UserName',
            properties: {
                Id: {
                    name: 'Id',
                    dataType: "Guid"
                },
                OptimisticKey: {
                    name: 'OptimisticKey',
                    dataType: "String"
                },
                UserName: {
                    name: 'UserName',
                    dataType: "String",
                    displayName: '用户名'
                },
                PlantextPassword: {
                    name: 'PlantextPassword',
                    dataType: "String",
                    displayName: '密码',
                    showInGrid: false,
                    editorConfig: {
                        inputType: 'password'
                    }
                },
                ConfirmPlantextPassword: {
                    name: 'ConfirmPlantextPassword',
                    dataType: "String",
                    displayName: '确认密码',
                    showInGrid: false,
                    editorConfig: {
                        inputType: 'password'
                    }
                }
            }
        };

        me.rules = ['aggregate-root', 'orderable'];

        me.callParent(arguments);
    }
});